<?php

namespace summer\swoole\pool\contract;

interface PoolInterface
{
    /**
     * Get a connection from the connection pool.
     */
    function get(): ConnectionInterface;

    /**
     * Release a connection back to the connection pool.
     */
    function release(ConnectionInterface $connection): void;

    /**
     * Close and clear the connection pool.
     */
    function flush(): void;
}